package com.our.biz;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.our.dao.InvestTypesMapper;
import com.our.model.InvestTypes;
import com.our.util.BusinessException;

@Service
public class InvestTypesBiz {
	@Resource
	private InvestTypesMapper dao;
	
	public List<InvestTypes> findAll() throws BusinessException{
		try {			
			return dao.findAll();
		} catch (Exception e) {
			e.printStackTrace();
			throw new BusinessException("E020201B05");
		}
	}
	public InvestTypes findById(int investtypeId) throws BusinessException{
		try {
			return dao.selectByPrimaryKey(investtypeId);			
		} catch (Exception e) {
			e.printStackTrace();
			throw new BusinessException("E020201B04");
		}
	}
}
